<main>
	<header>
		<div class="toolbar">
			<a class="bar-button back-button"><i class="dwz-icon-arrow-left"></i></a>
			<div class="header-title">svg图标库</div>
		</div>
	</header>

	<section>

		<div class="scroll-content dwz-scroll">
			<div class="scroll">

				<ul class="grid-col-3 tpl_list pane"></ul>
			</div>
		</div>

	</section>

</main>


<script id="tpl_list" type="text/html">
	{{each data as item}}
	<li class="item dwz-ctl-hover">
		<div class="item-icon"><i class="icon icon-{{item}}"></i></div>
		<p class="item-label">{{item}}</p>
	</li>
	{{/each}}
</script>

<script type="text/javascript">
	function helper(tpl, params) {
		// console.log(this, tpl, params)
		$.ajax({
			type: 'GET',
			url: 'doc/json/svgIcons.json',
			dataType: 'json',
			success: (json) => {
				console.log(json)
				if ($.isAjaxStatusOk(json)) {
					let _html = template.render(tpl.tpl_list, json);
					this.find('ul.tpl_list').html(_html).initUI();
				}
			},
			error: biz.ajaxError
		});
	}
</script>